package com.flinkjar.flinkjardemo.config;

public class DBConfig {

    /**
     *  分表数量
     */
    public static final int tableCount = 5;



    // source数据源-主机
    public static final String hostname_source = "127.0.0.1";
    // source数据源-端口
    public static final int port_source = 3306;
    // source数据源-用户名
    public static final String username_source = "root";
    // source数据源-密码
    public static final String password_source = "root3306";
    // source数据源-库
    public static final String database_source = "flink_test_db";
    // source数据源-表
    public static final String table_source = "user_product";


    // sink数据源-主机
    public static final String hostname_sink = "127.0.0.1";
    // sink数据源-端口
    public static final int port_sink = 3306;
    // sink数据源-用户名
    public static final String username_sink = "root";
    // sink数据源-密码
    public static final String password_sink = "root3306";
    // sink数据源-库
    public static final String database_sink = "flink_test_db";
    // sink数据源-表
    public static final String table_sink = "user_product";


    public static void main(String[] args) {
        StringBuilder url = new StringBuilder();
        url.append("jdbc:mysql://")
                .append(DBConfig.hostname_sink)
                .append(":")
                .append(DBConfig.port_sink)
                .append("/")
                .append(DBConfig.database_sink)
                .append("?useAffectedRows=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true");
        System.out.println(url.toString());
    }

}
